1. Field of the Invention
The present invention relates to an image processing apparatus, a method, and a program and, more specifically, relates to an image processing apparatus, a method, and a program that enable acquisition of high-quality photo mosaic images.
2. Description of the Related Art
The wide use of digital cameras has allowed users to take a large number of photographs. Thus, there is a need for methods of effectively displaying the large number of acquired photographs.
Photo-mosaic images are used in a method of effectively displaying acquired photographs. A photo-mosaic image is obtained by dividing a target image into multiple blocks and replacing the blocks with other images (hereinafter, referred to as “replacement images”) that have colors similar to the blocks.
In this way, when the photo-mosaic image is viewed from a distance fairly far away, the subject of the images appears the same as the subject of the target image. However, when the photo-mosaic image is viewed from distance fairly close, an array of multiple replacement images is viewed.
To generate such a photo-mosaic image, there is a technique according to the related art for selecting images disposed at blocks by determining through weighted calculation the distance from a representative value of the color of each block in a target image to a representative value of the color of each image, which is a candidate of a replacement image (for example, refer to Japanese Unexamined Patent Application Publication No. 2000-298722). There is also a technology according to the related art for separating a target image into separated areas containing a plurality of blocks on the basis of color similarity, placing candidates of replacement images into classes corresponding to the separated areas, and generating a photo-mosaic image by using a candidate placed into each class corresponding to each separated area (for example, refer to Japanese Unexamined Patent Application Publication No. 2005-100120).
Furthermore, the related art provides a method of generating a photo-mosaic image while maintaining the color distribution of the original target image by further dividing each of the blocks in a target image and matching these with images that are candidates of replacement images (for example, refer to Japanese Unexamined Patent Application Publication Nos. 11-341266 and 2000-295453).
Moreover, the related art provides a technique for selecting a raw image to be assigned to a block by comparing the average luminance of each blocks and the replacement image (for example, refer to Japanese Unexamined Patent Application Publication No. 11-341264). The related art also provides a technology for requesting a server that holds candidates of replacement images to select a replacement image for each block via a network (for example, refer to Japanese Unexamined Patent Application Publication No. 2000-200283).